<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:c="http://java.sun.com/jsp/jstl/core" 
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"  version="2.0">
	<jsp:directive.page contentType="text/html; charset=ISO-8859-1"
		pageEncoding="ISO-8859-1" session="false" />
	<jsp:output doctype-root-element="html"
		doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
		doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
		omit-xml-declaration="true" />
	<html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<title>Edit Product</title>
		</head>
		<body>
	<c:choose>
		<c:when test="${userSession.type == 'User'}">
			<jsp:include page="/WEB-INF/jsp/page.header.jsp"></jsp:include>
		</c:when>
		<c:otherwise>
		 	<jsp:include page="/WEB-INF/jsp/admin/header.jsp"></jsp:include>
		</c:otherwise>
	</c:choose>	
			<div style="text-align: left">
		
				<h1>Edit Product</h1>
				<form action="/service/product.edit.action" method="POST">
					<input type="hidden" value="${product.productId}" name="id" id="id" />
					<table border="0" cellpadding="0" cellspacing="0" >

						<tr>
							<td align="left">Category</td>
							<td>&#160;:&#160;</td>
							<td><input type="text" value="${fn:escapeXml(product.category)}" name="prodCat" id="prodCat" /></td>
						</tr>
						<tr>
							<td align="left">Product's Name</td>
							<td>&#160;:&#160;</td>
							<td><input type="text" value="${fn:escapeXml(product.name)}" name="prodName" id="prodName" /></td>
						</tr>
						<tr>
							<td align="left">Product's Picture</td>
							<td>&#160;:&#160;</td>
							<td><input type="text" value="${product.picture}" name="prodPicture"
								id="prodPicture" /></td>
						</tr>
						<tr>
							<td align="left">Product's Price</td>
							<td>&#160;:&#160;</td>
							<td>
							<fmt:formatNumber type="number" pattern="###,###.00" value="${product.price}" var="balance"/>
							<input type="text" value="${balance}" name="prodPrice"
								id="prodPrice" /></td>
						</tr>
						<tr valign="top">
							<td>Seller's Comment</td>
							<td>&#160;:&#160;</td>
							<td>
								<textarea rows="5" cols="20" name="sellerComment"
						id="sellerComment">${fn:escapeXml(product.comment)}</textarea></td>
						</tr>
						<tr><td colspan="3">&#160;</td></tr>
						<tr >
							<td colspan="2">&#160;&#160;</td>
							<td ><input type="submit" value="Submit"
								id="btnSubmit" /></td>
						</tr>
					</table>
				</form>
		
			</div>
		
		</body>
	</html>
</jsp:root>